package com.gree.flowable.app.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gree.flowable.app.pojo.ex.FlwExNodeset;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface FlwExNodesetMapper extends BaseMapper<FlwExNodeset> {

    @Select("select * from flw_ex_nodeset fens where fens.process_key = #{processKey} and fens.vers = (select max(vers) from flw_ex_nodeset where process_key = #{processKey})")
    @ResultType(FlwExNodeset.class)
    List<FlwExNodeset> getMaxVersionList(@Param("processKey") String processKey);

}
